import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {PpypCategoryComponent} from './category/ppyp-category/ppyp-category.component';
import {PpypCommodityOneComponent} from './commodity/ppyp-commodity-one/ppyp-commodity-one.component';
import {PpypCommodityTwoComponent} from './commodity/ppyp-commodity-two/ppyp-commodity-two.component';
import {PpypOrderManageComponent} from './order/ppyp-order-manage/ppyp-order-manage.component';
import {PpypUserManageComponent} from './user/ppyp-user-manage/ppyp-user-manage.component';
import {PpypOrderDetailComponent} from './order/ppyp-order-detail/ppyp-order-detail.component';


const routes: Routes = [
  {path: '', redirectTo: 'ppypCategory', pathMatch: 'full'},
  {path: 'ppypCategory', component: PpypCategoryComponent, data: {breadcrumb: '分类管理'}},
  {path: 'ppypCommodityOne', component: PpypCommodityOneComponent, data: {breadcrumb: '展示区域一'}},
  {path: 'ppypCommodityTwo', component: PpypCommodityTwoComponent, data: {breadcrumb: '展示区域二'}},
  {path: 'ppypOrderManage', component: PpypOrderManageComponent, data: {breadcrumb: '订单管理', keep: true}},
  {path: 'ppypOrderDetail', component: PpypOrderDetailComponent, data: {breadcrumb: '订单详情'}},
  {path: 'ppypUserManage', component: PpypUserManageComponent, data: {breadcrumb: '用户管理'}},
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class PpypRoutingModule {
}
